using System.Collections.Generic;

namespace SevenDigital.EndUserManagement.Core.Repository
{
	public interface IRepository<TEntity, TIdentity>
		where TEntity : IEntity<TIdentity>
		where TIdentity: struct
	{
		TEntity FindById(TIdentity id);
		TEntity FindByIdAndLock(TIdentity id);
		IList<TEntity> FindAll();
		TEntity MakePersistent(TEntity entity);
		void MakeTransient(TEntity entity);
	}
}